<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
</head>
<body>

  <div id="app">
    <button>ref{{age}}</button>
    <button>reactive{{info.age}}</button>
    <button @cilck="total++">{{total}} 票</button>
  </div>

  <script>
  const { createApp , ref, reactive }  = Vue;
  const app = createApp({
    setup(){
        const age = ref(0);

        const total = 1;    

        const info = reactive({
          age: 0
          
        });

        console.log(age.value);
        console.log(info.age);
        
        return{
            age,
            total,
            info
        }

    }
  });


  app.mount('#app');

  </script>

</body>
</html>